<?php

namespace App\Models;

class SysDictType extends ApiBaseModel
{
    protected $table = 'sys_dict_type';
    protected $fillable = [
        'dict_name',
        'dict_type',
        'status',
        'create_by',
        'update_by',
        'remark',
        'created_at',
        'updated_at'
    ];
    protected $casts = [
        'status' => 'string',
    ];

    public function dictDatas(){
        return $this->hasMany(SysDictData::class,'dict_type', 'dict_type')->where('is_default', 'Y');
    }
}
